import 'package:flutter/material.dart';

class FlexPage extends StatefulWidget {
  const FlexPage({super.key});

  @override
  State<FlexPage> createState() => _FlexPageState();
}

class _FlexPageState extends State<FlexPage> {
  @override
  Widget build(BuildContext context) {
    return Flex(
      direction: Axis.vertical,
      children: [
        Expanded(
          flex: 1,
          child: Container(color: Colors.blueAccent),
        ),
        Expanded(
          flex: 1,
          child: Container(color: Colors.yellowAccent),
        ),
      ],
    );
  }
}
